package com.cmc.cloud.cmclink.doc.api.document.req.si;

import com.cmc.cloud.cmclink.doc.api.document.req.AttachmentUpdateReqDto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author 周贤
 * @date 2025/8/27
 */
@Schema(description = "管理后台 - 提单拆申请主创建 Request VO")
@Data
@EqualsAndHashCode()
@ToString(callSuper = true)
@Valid
public class BlnoCombineDto {

    @Schema(description = "待合并提单列表", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{BlnoCombineVO.spiltChildVOs.NotNull}")
    @Valid
    private List<BlnoCombineChildDto> spiltChildDtos;

    @Schema(description = "合并结果主信息", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{BlnoCombineVO.blnoBeCombineVO.NotNull}")
    private BlnoBeCombineDto blnoBeCombineDto;

    @Schema(description = "合并的箱信息", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{BlnoCombineVO.cntrCombineChild.NotNull}")
    @Valid
    private List<BlnoCntrUpdateReqDto> cntrCombineChild;

    @Schema(description = "合并单货物信息")
    private BlnoCargoUpdateReqDto blnoCargoCombine;

    @Schema(description = "合并单附件信息")
    private List<AttachmentUpdateReqDto> attachmentCombines;

    @Schema(description = "合并提单数据来源",example = "WEB")
    private String combineDataSource;
}
